/*
 * Copyright 2005-2013 evolution.com. All rights reserved.
 */
package com.evolution.warlock.service.impl;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.evolution.warlock.Order;
import com.evolution.warlock.Order.Direction;
import com.evolution.warlock.dao.EthnicDao;
import com.evolution.warlock.entity.Ethnic;
import com.evolution.warlock.service.EthnicService;

/**
 * Service - 民族
 * 
 * @author EVOLUTION Team
 * @version 1.0
 */
@Service("ethnicServiceImpl")
public class EthnicServiceImpl extends BaseServiceImpl<Ethnic, Long> implements EthnicService {

  @Resource(name = "ethnicDaoImpl")
  private EthnicDao ethnicDao;
	 
  @Resource(name = "ethnicDaoImpl")
  public void setEthnicDao(EthnicDao ethnicDao) {
	super.setBaseDao(ethnicDao);
  }

  @Transactional(readOnly = true)
  public List<Ethnic> findListOrder(String periodCd) {
	List<Order> orders = new ArrayList<Order>();
	orders.add(new Order(periodCd, Direction.desc));
	return ethnicDao.findList(null, null, null, orders);
  }
  
}
